package com.ruoyi.archive.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.archive.mapper.SysSimArchiveMapper;
import com.ruoyi.archive.domain.SysSimArchive;
import com.ruoyi.archive.service.ISysSimArchiveService;

/**
 * SIM卡档案Service业务层处理
 * 
 * @author laifolai
 * @date 2023-02-07
 */
@Service
public class SysSimArchiveServiceImpl implements ISysSimArchiveService 
{
    @Autowired
    private SysSimArchiveMapper sysSimArchiveMapper;

    /**
     * 查询SIM卡档案
     * 
     * @param cardId SIM卡档案主键
     * @return SIM卡档案
     */
    @Override
    public SysSimArchive selectSysSimArchiveByCardId(Integer cardId)
    {
        return sysSimArchiveMapper.selectSysSimArchiveByCardId(cardId);
    }

    /**
     * 查询SIM卡档案列表
     * 
     * @param sysSimArchive SIM卡档案
     * @return SIM卡档案
     */
    @Override
    public List<SysSimArchive> selectSysSimArchiveList(SysSimArchive sysSimArchive)
    {
        return sysSimArchiveMapper.selectSysSimArchiveList(sysSimArchive);
    }

    /**
     * 新增SIM卡档案
     * 
     * @param sysSimArchive SIM卡档案
     * @return 结果
     */
    @Override
    public int insertSysSimArchive(SysSimArchive sysSimArchive)
    {
        sysSimArchive.setCreateTime(DateUtils.getNowDate());
        return sysSimArchiveMapper.insertSysSimArchive(sysSimArchive);
    }

    /**
     * 修改SIM卡档案
     * 
     * @param sysSimArchive SIM卡档案
     * @return 结果
     */
    @Override
    public int updateSysSimArchive(SysSimArchive sysSimArchive)
    {
        sysSimArchive.setUpdateTime(DateUtils.getNowDate());
        return sysSimArchiveMapper.updateSysSimArchive(sysSimArchive);
    }

    /**
     * 批量删除SIM卡档案
     * 
     * @param cardIds 需要删除的SIM卡档案主键
     * @return 结果
     */
    @Override
    public int deleteSysSimArchiveByCardIds(Integer[] cardIds)
    {
        return sysSimArchiveMapper.deleteSysSimArchiveByCardIds(cardIds);
    }

    /**
     * 删除SIM卡档案信息
     * 
     * @param cardId SIM卡档案主键
     * @return 结果
     */
    @Override
    public int deleteSysSimArchiveByCardId(Integer cardId)
    {
        return sysSimArchiveMapper.deleteSysSimArchiveByCardId(cardId);
    }
}
